<%--
  Created by IntelliJ IDEA.
  User: pc
  Date: 2024/3/15
  Time: 17:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>角色维护</title>
</head>
<body>
    <h1>角色维护</h1>
    <%--使用JSTL循环列表，渲染--%>
    <table border="1" cellspacing="0" cellpadding="10" width="100%" style="text-align: center">
        <p><a href="add.jsp">添加</a></p>
        <tr>
            <th>id</th>
            <th>角色</th>
            <th colspan="2">操作</th>
        </tr>
        <c:forEach items="${list1}" var="role">
            <tr>
                <td>${role.id}</td>
                <td>${role.role}</td>
                <td>
                    <a href="edit.jsp?id=${role.id}&roleName=${role.role}">编辑</a>
                </td>
                <td>
                    <a href="/role/delete?id=${role.id}">删除</a>
                </td>
            </tr>
        </c:forEach>
    </table>
</body>
</html>
